home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "msinet.ocx"
- Object = "{24365B29-A3B5-11D1-B8B0-444553540000}#1.0#0"; "Xfxforms.ocx"
- Object = "{BB859389-001D-11D1-8E83-00805F3AEC32}#1.0#0"; "Systray.ocx"
- Begin VB.Form frmMain
- BackColor = &H00FF8080&
- BorderStyle = 0 'None
- Caption = "Form1"
- ClientHeight = 6210
- ClientLeft = 4320
- ClientTop = 3150
- ClientWidth = 9270
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6210
- ScaleWidth = 9270
- ShowInTaskbar = 0 'False
- Begin VB.Timer tmrHide
- Enabled = 0 'False
- Interval = 2
- Left = 4080
- Top = 2880
- End
- Begin VB.Timer tmrScroll
- Interval = 50
- Left = 7560
- Top = 360
- End
- Begin VB.Timer tmrUpdater
- Interval = 1000
- Left = 4200
- Top = 1680
- End
- Begin VB.TextBox txtPingThis
- Height = 285
- Left = 5760
- TabIndex = 26
- Top = 5520
- Width = 1575
- End
- Begin InetCtlsObjects.Inet inetWeb
- Left = 2400
- Top = 2040
- _ExtentX = 1005
- _ExtentY = 1005
- _Version = 327681
- End
- Begin VB.Timer tmrAlert
- Enabled = 0 'False
- Index = 2
- Interval = 1000
- Left = 3360
- Top = 1200
- End
- Begin VB.Timer tmrAlert
- Enabled = 0 'False
- Index = 0
- Interval = 10000
- Left = 2400
- Top = 1200
- End
- Begin SysTrayCtl.cSysTray cSysTray1
- Left = 2880
- Top = 2040
- _ExtentX = 900
- _ExtentY = 900
- InTray = -1 'True
- TrayIcon = "frmMainWeb.frx":0000
- TrayTip = ""
- End
- Begin VB.Timer tmrAlert
- Enabled = 0 'False
- Index = 1
- Interval = 1000
- Left = 2880
- Top = 1200
- End
- Begin VB.Timer tmrMon
- Interval = 50000
- Left = 3840
- Top = 1200
- End
- Begin xfxFormShaper.FormShaper FormShaper1
- Left = 9240
- Top = 5160
- _ExtentX = 1852
- _ExtentY = 1296
- End
- Begin VB.Line Line20
- BorderColor = &H0000FF00&
- X1 = 240
- X2 = 3720
- Y1 = 5640
- Y2 = 5640
- End
- Begin VB.Label Label13
- BackColor = &H00000000&
- Height = 255
- Left = 120
- TabIndex = 35
- Top = 5640
- Width = 3735
- End
- Begin VB.Line Line19
- BorderColor = &H0000FF00&
- X1 = 240
- X2 = 3720
- Y1 = 5160
- Y2 = 5160
- End
- Begin VB.Line Line18
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 4920
- Y2 = 4920
- End
- Begin VB.Label lblInfo
- BackColor = &H00000000&
- Height = 255
- Left = 120
- TabIndex = 34
- Top = 4920
- Width = 3735
- End
- Begin VB.Line Line17
- BorderColor = &H0000FF00&
- X1 = 240
- X2 = 240
- Y1 = 5160
- Y2 = 5640
- End
- Begin VB.Line Line16
- BorderColor = &H0000FF00&
- X1 = 3720
- X2 = 3720
- Y1 = 5160
- Y2 = 5640
- End
- Begin VB.Line Line15
- BorderColor = &H0000FF00&
- X1 = 1320
- X2 = 1320
- Y1 = 5160
- Y2 = 5640
- End
- Begin VB.Line Line14
- BorderColor = &H0000FF00&
- X1 = 360
- X2 = 3840
- Y1 = 5640
- Y2 = 5640
- End
- Begin VB.Line Line13
- BorderColor = &H0000FF00&
- X1 = 240
- X2 = 3720
- Y1 = 5400
- Y2 = 5400
- End
- Begin VB.Line Line12
- BorderColor = &H0000FF00&
- X1 = 240
- X2 = 3720
- Y1 = 5160
- Y2 = 5160
- End
- Begin VB.Label Label10
- BackColor = &H00000000&
- Caption = " Next Scan"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 120
- TabIndex = 33
- Top = 5400
- Width = 1335
- End
- Begin VB.Label lblNextcheck
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 1440
- TabIndex = 32
- Top = 5400
- Width = 2415
- End
- Begin VB.Line Line11
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 4920
- Y2 = 4920
- End
- Begin VB.Label lblCurrentTime
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 1440
- TabIndex = 31
- Top = 5160
- Width = 2415
- End
- Begin VB.Label Label1
- BackColor = &H00000000&
- Caption = " Current Time"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 120
- TabIndex = 30
- Top = 5160
- Width = 1335
- End
- Begin VB.Line Line10
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 4920
- Y2 = 4920
- End
- Begin VB.Label lblScroll
- BackStyle = 0 'Transparent
- Caption = "WebMon WebServer Service Monitor"
- BeginProperty Font
- Name = "Comic Sans MS"
- Size = 18
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = -6120
- TabIndex = 29
- Top = 240
- Width = 6375
- End
- Begin VB.Shape Shape5
- Height = 855
- Left = 0
- Shape = 4 'Rounded Rectangle
- Top = 120
- Width = 9255
- End
- Begin VB.Line Line9
- BorderColor = &H00FF00FF&
- X1 = 3720
- X2 = 3720
- Y1 = 3720
- Y2 = 4920
- End
- Begin VB.Line Line8
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 240
- Y1 = 3720
- Y2 = 4920
- End
- Begin VB.Line Line7
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 3720
- Y2 = 3720
- End
- Begin VB.Line Line6
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 4920
- Y2 = 4920
- End
- Begin VB.Line Line5
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 4680
- Y2 = 4680
- End
- Begin VB.Line Line4
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 4440
- Y2 = 4440
- End
- Begin VB.Line Line3
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 4200
- Y2 = 4200
- End
- Begin VB.Line Line2
- BorderColor = &H00FF00FF&
- X1 = 240
- X2 = 3720
- Y1 = 3960
- Y2 = 3960
- End
- Begin VB.Line Line1
- BorderColor = &H00FF00FF&
- X1 = 1320
- X2 = 1320
- Y1 = 3720
- Y2 = 4920
- End
- Begin VB.Label Label11
- BackColor = &H00000000&
- Caption = "Label11"
- Height = 735
- Left = 6600
- TabIndex = 28
- Top = 3840
- Width = 2535
- End
- Begin VB.Label lblPStats2
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 375
- Left = 4200
- TabIndex = 27
- Top = 4560
- Width = 4935
- End
- Begin VB.Image Image4
- Height = 480
- Left = 8280
- Picture = "frmMainWeb.frx":0452
- ToolTipText = "Hide"
- Top = 5400
- Width = 480
- End
- Begin VB.Image Image3
- Height = 480
- Left = 7560
- Picture = "frmMainWeb.frx":0894
- ToolTipText = "Manual Ping"
- Top = 5400
- Width = 480
- End
- Begin VB.Label lblTimeMS
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 5400
- TabIndex = 25
- Top = 4320
- Width = 1215
- End
- Begin VB.Label Label9
- BackColor = &H00000000&
- Caption = "Time in m/s"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 4200
- TabIndex = 24
- Top = 4320
- Width = 1215
- End
- Begin VB.Label lblBytesRecieved
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 5400
- TabIndex = 23
- Top = 4080
- Width = 1215
- End
- Begin VB.Label Label8
- BackColor = &H00000000&
- Caption = "Bytes Recieved"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 4200
- TabIndex = 22
- Top = 4080
- Width = 1215
- End
- Begin VB.Label lblBytesSent
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 5400
- TabIndex = 21
- Top = 3840
- Width = 1215
- End
- Begin VB.Label Label7
- BackColor = &H00000000&
- Caption = "Bytes Sent"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 4200
- TabIndex = 20
- Top = 3840
- Width = 1215
- End
- Begin VB.Label lblPingStatus
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 615
- Left = 4200
- TabIndex = 19
- Top = 3240
- Width = 4935
- End
- Begin VB.Image Image2
- Height = 480
- Left = 5160
- Picture = "frmMainWeb.frx":0CD6
- ToolTipText = "Reset Alarms"
- Top = 5400
- Width = 480
- End
- Begin VB.Image Image1
- Height = 480
- Left = 4440
- Picture = "frmMainWeb.frx":1118
- ToolTipText = "Add New Server"
- Top = 5400
- Width = 480
- End
- Begin VB.Image imgIcon
- Height = 480
- Index = 0
- Left = 3480
- Top = 2040
- Visible = 0 'False
- Width = 480
- End
- Begin VB.Image imgIcon
- Height = 480
- Index = 1
- Left = 5400
- Top = 1320
- Visible = 0 'False
- Width = 480
- End
- Begin VB.Label lblDT
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 1440
- TabIndex = 18
- Top = 4680
- Width = 2415
- End
- Begin VB.Label lblFailed
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 1440
- TabIndex = 17
- Top = 4440
- Width = 2415
- End
- Begin VB.Label Label6
- BackColor = &H00000000&
- Caption = " Down Time"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 120
- TabIndex = 16
- Top = 4680
- Width = 1335
- End
- Begin VB.Label Label5
- BackColor = &H00000000&
- Caption = " Last Failed"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 120
- TabIndex = 15
- Top = 4440
- Width = 1335
- End
- Begin VB.Label lblLastCheck
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 1440
- TabIndex = 14
- Top = 4200
- Width = 2415
- End
- Begin VB.Label Label4
- BackColor = &H00000000&
- Caption = " Last Checked "
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 120
- TabIndex = 13
- Top = 4200
- Width = 1335
- End
- Begin VB.Label lblURL
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 1440
- TabIndex = 12
- Top = 3960
- Width = 2415
- End
- Begin VB.Label label3
- BackColor = &H00000000&
- Caption = " URL"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 120
- TabIndex = 11
- Top = 3960
- Width = 1335
- End
- Begin VB.Label lblMName
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "Comic Sans MS"
- Size = 14.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 495
- Left = 120
- TabIndex = 10
- Top = 3240
- Width = 3735
- End
- Begin VB.Label lblIP
- BackColor = &H00000000&
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 1440
- TabIndex = 9
- Top = 3720
- Width = 2415
- End
- Begin VB.Label Label2
- BackColor = &H00000000&
- Caption = " IP Address"
- ForeColor = &H0000FFFF&
- Height = 255
- Left = 120
- TabIndex = 8
- Top = 3720
- Width = 1335
- End
- Begin VB.Shape Shape4
- Height = 855
- Left = 4080
- Shape = 4 'Rounded Rectangle
- Top = 5160
- Width = 5055
- End
- Begin VB.Shape Shape3
- BackColor = &H00000000&
- Height = 1935
- Left = 4080
- Shape = 4 'Rounded Rectangle
- Top = 3120
- Width = 5175
- End
- Begin VB.Shape Shape2
- BackColor = &H00000000&
- Height = 2895
- Left = 0
- Shape = 4 'Rounded Rectangle
- Top = 3120
- Width = 3975
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 7
- Left = 6960
- TabIndex = 7
- Top = 2160
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 6
- Left = 6960
- TabIndex = 6
- Top = 1200
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 5
- Left = 4680
- TabIndex = 5
- Top = 2160
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 3
- Left = 2400
- TabIndex = 4
- Top = 2160
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 4
- Left = 4680
- TabIndex = 3
- Top = 1200
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 2
- Left = 2400
- TabIndex = 2
- Top = 1200
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 1
- Left = 120
- TabIndex = 1
- Top = 2160
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Label lblServer
- Alignment = 2 'Center
- BackColor = &H00000000&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 735
- Index = 0
- Left = 120
- TabIndex = 0
- Top = 1200
- Visible = 0 'False
- Width = 2055
- End
- Begin VB.Shape Shape1
- Height = 1935
- Left = 0
- Shape = 4 'Rounded Rectangle
- Top = 1080
- Width = 9255
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim mmflag As Boolean
- Dim sax As Integer
- Dim beepcount As Integer
- Dim Say As Integer
- Public intServClicked As Integer
- Private Sub cSysTray1_MouseDblClick(Button As Integer, Id As Long)
- If Button = 1 Then 'left mouse button
- CForm.Show
- End If
- End Sub
- Private Sub cSysTray1_MouseDown(Button As Integer, Id As Long)
- If Button = 2 Then 'right mouse button
- PopupMenu frmPopups.mnuQuitMain
- End If
- End Sub
- Private Sub Form_Load()
- If App.PrevInstance = True Then
- MsgBox ("You are already running an instance of this application")
- 'prevent a conflict of registry settings
- End
- End If
- Me.Hide
- 'If LSetting("TOP") = "" Then
- ' SSetting "TOP", Me.Top
- ' End If
- 'If LSetting("LEFT") = "" Then
- ' SSetting "LEFT", Me.Left
- ' End If
- 'Me.Top = LSetting("TOP")
- 'Me.Left = LSetting("LEFT")
- App.TaskVisible = False
- intNoOfServers = Val(LSetting("NoOfServers"))
- modWeb.refresh
- With FormShaper1
- .ShapeIt ' shape the form
- End With
- Set CForm = Me
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- SSetting "TOP", Me.Top
- SSetting "LEFT", Me.Left
- End Sub
- Private Sub Image1_Click()
- blnEdit = False
- frmNewServer.Show
- End Sub
- Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Image1.BorderStyle = 1
- End Sub
- Private Sub Image2_Click()
- Dim X As Integer
- For X = tmrAlert.LBound To tmrAlert.UBound
- tmrAlert(X).Enabled = False ' disable all timers in the alert control array
- Next X
- For X = FrmGateWay.tmrAlert2.LBound To FrmGateWay.tmrAlert2.UBound
- FrmGateWay.tmrAlert2(X).Enabled = False
- Next X
- Set cSysTray1.TrayIcon = imgIcon(0).Picture 'set tray icon
- For X = lblServer.LBound To lblServer.UBound
- lblServer(X).BackColor = &O0& ' set all labels to black
- Next X
- For X = FrmGateWay.lblGateWay.LBound To FrmGateWay.lblGateWay.UBound
- FrmGateWay.lblGateWay(X).BackColor = &O0& ' set all labels to black
- Next X
- End Sub
- Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Image2.BorderStyle = 1
- End Sub
- Private Sub Image3_Click()
- Dim ECHO As ICMP_ECHO_REPLY
- frmMain.lblBytesSent = ""
- frmMain.lblBytesRecieved = ""
- frmMain.lblTimeMS = ""
- frmMain.lblPingStatus.Caption = ""
- lblPStats2.Caption = ""
- If Val(txtPingThis) > 0 And InStr(1, txtPingThis, ".") > 1 Then 'ensure that ip address is valid syntax
- frmMain.lblPingStatus.Caption = "Pinging " & txtPingThis & _
- "with 9 bytes of Data................."
- Call Ping(txtPingThis, ECHO)
- frmMain.lblBytesSent = "9" ' am sending 'Echo This' which is 9 bytes
- frmMain.lblBytesRecieved = ECHO.DataSize ' the data recieved back this should be 9 if successful
- frmMain.lblTimeMS = ECHO.RoundTripTime 'time taken in m/s
- frmMain.lblPingStatus.Caption = GetStatusCode(ECHO.status) 'status code see modping for details
- Select Case Val(GetStatusCode(ECHO.status))
- Case 0
- SayThis "Pinged the server " & txtPingThi & ". The ping was successful"
- lblPStats2.Caption = "Successful ping to " & txtPingThis
- Case Else
- frmMain.lblPStats2.Caption = "Unable to ping " & txtPingThis
- SayThis "Couldnt Ping the server " & txtPingThis & ". The ping was UnSuccessful"
- End Select
- Else
- MsgBox ("Can't ping that!")
- End If
- End Sub
- Private Sub Image3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Image3.BorderStyle = 1
- End Sub
- Private Sub Image4_Click()
- tmrHide.Enabled = True
- End Sub
- Private Sub Image4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Image4.BorderStyle = 1
- End Sub
- Private Sub lblServer_Click(Index As Integer)
- lblIP = LSetting("IP" & Index)
- lblMName = LSetting("MName" & Index)
- lblURL = LSetting("URL" & Index)
- lblLastCheck = LSetting("Lcheck" & Index)
- lblFailed = LSetting("Lfail" & Index)
- If LSetting("DownSince" & Index) <> "" Then
- lblDT = ConvertToHMS(DateDiff("s", LSetting("DownSince" & Index), Now)) 'convert seconds to minutes and seconds
- Else
- lblDT = "None"
- End If
- intServClicked = Index
- End Sub
- Private Sub lblServer_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim intLabs As Integer
- If Button = 2 Then
- intServClicked = Index
- If blnRebooting(Index) = True Then
- frmPopups.mnuReboot.Caption = "Abort Reboot"
- Else
- frmPopups.mnuReboot.Caption = "Reboot Server"
- End If
- PopupMenu frmPopups.mnuMain
- For intLabs = lblServer.LBound To lblServer.UBound
- lblServer(intLabs).Visible = False
- Next intLabs
- modWeb.refresh 'refresh server list
- End If
- End Sub
- Private Sub lblServer_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- lblServer(Index).BorderStyle = 1
- lblServer(Index).ToolTipText = LSetting("URL" & Index)
- End Sub
- Private Sub tmrAlert_Timer(Index As Integer)
- If Index = 0 Then
- tmrAlert(0).Enabled = False
- tmrAlert(1).Enabled = True
- tmrAlert(2).Enabled = True
- End If
- If Index = 1 Then
- DoEvents
- Beep
- beepcount = beepcount + 1
- If beepcount = 5 Then
- beepcount = 0
- tmrAlert(1).Enabled = False
- tmrAlert(0).Enabled = True
- End If
- End If
- If Index = 2 Then
- If cSysTray1.TrayIcon = imgIcon(0).Picture Then
- Set cSysTray1.TrayIcon = imgIcon(1).Picture
- Else
- Set cSysTray1.TrayIcon = imgIcon(0).Picture
- End If
- End If
- End Sub
- Private Sub tmrHide_Timer()
- Me.Hide
- End Sub
- Private Sub TmrMon_Timer()
- Dim Y As Integer
- Dim tmpURL As String
- Dim strErrMsg As String
- Dim strM As String
- Dim strS As String
- For Y = 0 To Val(LSetting("NoOfServers")) - 1
- tmpURL = LSetting("URL" & Y)
- If modWeb.CheckUrl(tmpURL, frmMain) = False Then
- 'failed test
- lblServer(Y).BackColor = &HFF&
- If blnRebooting(Y) = False Then
- tmrAlert(0).Enabled = True
- LogIt ("Failed test for " & tmpURL)
- Else
- 'rebooting so dont alarm
- LogIt ("Failed test for " & tmpURL & "[REBOOTING]")
- tmrAlert(0).Enabled = False
- End If
- SSetting "LFail" & Y, Now
- SSetting "Lcheck" & Y, Now
- If LSetting("DownSince" & Y) = "" Then
- SSetting "DownSince" & Y, Now
- Else
- 'already down
- End If
- strM = Left(ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), InStr(1, ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), ":") - 1)
- strS = Mid(ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), InStr(1, ConvertToHMS(DateDiff("s", LSetting("DownSince" & Y), Now)), ":") + 1)
- strErrMsg = "Warning! Critical service failure for " & LSetting("MName" & Y) & " at " & LSetting("LFail" & Y) & " Service has not responded for " & _
- strM & " Minutes and " & strS & " Seconds"
- SayThis strErrMsg
- Else
- If InStr(1, LSetting("LFail" & Y), "/") > 0 Then
- 'already has a date
- Else
- 'not failed ever
- SSetting "LFail" & Y, "None"
- End If
- SSetting "DownSince" & Y, ""
- SSetting "Lcheck" & Y, Now
- 'okay
- blnRebooting(Y) = False
- frmPopups.mnuReboot.Caption = "Reboot Server"
- End If
- Next Y
- End Sub
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim fml As Long
- Dim fmt As Long
- Dim a As Integer
- For a = 0 To 7
- lblServer(a).BorderStyle = 0
- Next a
- If mmflag = True Then
- fml = Me.Left: fmt = Me.Top
- If X > sax Then Me.Left = fml + (X - sax)
- If X < sax Then Me.Left = fml - (sax - X)
- If Y > Say Then Me.Top = fmt + (Y - Say)
- If Y < Say Then Me.Top = fmt - (Say - Y)
- End If
- Image1.BorderStyle = 0
- Image2.BorderStyle = 0
- Image3.BorderStyle = 0
- Image4.BorderStyle = 0
- End Sub
- Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If mmflag = False Then
- sax = X
- Say = Y
- mmflag = True
- End If
- Me.MousePointer = vbSizePointer
- End Sub
- Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- mmflag = False
- Me.MousePointer = vbDefault
- End Sub
- Private Sub tmrScroll_Timer()
- With lblScroll
- DoEvents
- .Left = .Left + 15
- If .Left > 9000 Then
- .Left = -6120
- End If
- End With
- End Sub
- Private Sub tmrUpdater_Timer()
- On Error GoTo e_trap
- Dim intTempNext As Integer
- If LSetting("DownSince" & intServClicked) <> "" Then
- lblDT = ConvertToHMS(DateDiff("s", LSetting("DownSince" & intServClicked), Now))
- lblDT = "None"
- End If
- lblCurrentTime.Caption = Format(Now, "hh:mm:ss")
- DoEvents
- intTempNext = DateDiff("s", Now, DateAdd("s", (tmrMon.Interval / 1000), LSetting("LCheck" & intServClicked)))
- If intTempNext > tmrMon.Interval Or intTempNext < 0 Then
- lblNextCheck = "Unknown"
- Else
- lblNextCheck = intTempNext
- End If
- Exit Sub
- e_trap:
- lblNextCheck = "Unknown"
- End Sub
-